Skip to content

Conversation

@artembilan
Copy link
Member

Related to: #10090

Spring AMQP now provides the org.springframework.amqp:spring-rabbitmq-client library to communicate to RabbitMQ with AMQP 1.0 protocol.

  • Replace spring-rabbit with the spring-rabbitmq-client since the latter brings the AMQP 0.9 protocol library as transitive dependency
  • Introduce an AmqpClientMessageHandler based on the AsyncAmqpTemplate where its implementation should be for AMQP 1.0, e.g. org.springframework.amqp.rabbitmq.client.RabbitAmqpTemplate
  • This outbound channel adapter can behave as a gateway when setRequiresReply(true)
  • Cover basic AmqpClientMessageHandler with integration tests
  • Document this new feature

@artembilan
Copy link
Member Author

This just an initial PoC and provides only an outbound channel adapter implementation.
Can be merged as is, or I can go ahead and push more for other features after review.

I anticipate these features yet:

  • AmqpClientMessageProducer - an event-driven channel adapter for receiving AMQP 1.0 messages. Going to be based on the RabbitAmqpListenerContainer
  • AmqpClientInboundGateway - a MessagingGatewaySupport implementation for receiving AMQP 1.0 messages and replying, respectively. Going to be based on the RabbitAmqpListenerContainer
  • AmqpClientMessageSource - a source polling channel adapter for polling AMQP 1.0 messages from a queue. Going to be based on the AsyncAmqpTemplate.receive() API
  • Java DSL for all new components
  • More docs
  • What's New entry.

Thanks

Copy link
Contributor

@cppwfs cppwfs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!
My usual nitpicks :-)

@artembilan artembilan requested a review from cppwfs September 25, 2025 14:14
Copy link
Contributor

@cppwfs cppwfs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to previous commit look great!
Addition of the AmqpClientMessageProducer look good as well. Just one nitpick for an additional test.

This some cool stuff! Thanks for working on it!

Related to: spring-projects#10090

Spring AMQP now provides the `org.springframework.amqp:spring-rabbitmq-client` library
to communicate to RabbitMQ with AMQP 1.0 protocol.

* Replace `spring-rabbit` with the `spring-rabbitmq-client` since the latter brings
the AMQP 0.9 protocol library as transitive dependency
* Introduce an `AmqpClientMessageHandler` based on the `AsyncAmqpTemplate`
where its implementation should be for AMQP 1.0, e.g. `org.springframework.amqp.rabbitmq.client.RabbitAmqpTemplate`
* This outbound channel adapter can behave as a gateway when `setRequiresReply(true)`
* Cover basic `AmqpClientMessageHandler` with integration tests
* Document this new feature
…rom RabbitMQ AMQP 1.0

* Fix typos and language in docs and Javadocs
* Add tests and docs about new `AmqpClientMessageProducer`
* Add `whats-new.adoc` bullet for a new `spring-integration-amqp` feature
…iledException`

when exception is bubbled from the downstream flow
* Add test for error handling
* Add test for batch manual ack
* Remove redundant (and dangerous) `@ComponentScan` from the `ManualAckTests`:
it does not do anything for the test suite, but is able to see all the `@Configuration`
classes in other tests of this package.
That may lead to unexpected behavior and failures
@artembilan artembilan changed the title GH-10090: Add AmqpClientMessageHandler for AMQP 1.0 GH-10090: Add channel adapters for AMQP 1.0 Sep 26, 2025
@artembilan artembilan requested a review from cppwfs September 26, 2025 12:27
@artembilan
Copy link
Member Author

@cppwfs ,

let me know if you are going to merge this after your next review, or is that OK for me to continue piling related features into this PR.
Thanks

Copy link
Contributor

@cppwfs cppwfs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
This is great stuff!
Thanks for adding the batch test!

@cppwfs cppwfs merged commit c066338 into spring-projects:main Sep 26, 2025
3 checks passed
@artembilan artembilan deleted the GH-10090 branch October 6, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants